package com.core.web.actions;

import com.core.dao.UserDetails;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class UserAction extends ActionSupport implements ModelDriven<UserForm>{
	
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6099129145597495532L;
	UserForm frombean = new UserForm();
	
	public UserForm getModel() {
		 
		System.out.println("System.oout.println");
		
		return frombean;
 
	}
	
	public String entryForm()
	{
		
		return "userEntryForm";
	}
	public String add()
	{
		System.out.println("Email ID "+frombean.emailId);
		System.out.println("Email ID "+frombean.userType);
		System.out.println("Email ID "+frombean.firstName);
		System.out.println("Email ID "+frombean.city);
		UserDetails.addUser(frombean);
		return "userEntryForm";
	}

	
}
